//
//  ForumGather.m
//  cityCar
//
//  Created by yao on 14-10-29.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ForumGather.h"

@implementation ForumGather

- (void)dealloc
{
    [_Id release];
    [_name release];
    [_image release];
    [_url release];
    [super dealloc];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    if ([super init]) {
        
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.Id = [aDecoder decodeObjectForKey:@"id"];
        self.url = [aDecoder decodeObjectForKey:@"url"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeObject:self.Id forKey:@"id"];
    [aCoder encodeObject:self.url forKey:@"url"];
    //    [aCoder encodeInteger:self.number forKey:@"number"];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    // 系统的纠错方法,当key值不在类的属性列表的时候,就会调用
    
    
    if ([key isEqualToString:@"id"]) {
        self.Id = value;
    }
    
}

// 取值的纠错方法
- (id)valueForUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        return self.Id;
    }
    return nil;
}

@end
